﻿<HTML>
<HEAD>
<TITLE>文档定位</TITLE>
</HEAD>
<body>
	<h1>文档定位</h1>
	<script language="javascript" type="text/javascript">
		var ustring = document.URL;
		var sstring = document.location;
		document.write("<h3>使用location属性得到的URL为：");
		document.write(sstring);
		document.write("<h3>使用URL属性得到的URL为：");
		document.write(ustring);
		document.location = "http://www.baidu.com";
	</script>
</body>
</HTML>